﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AMS.DataAccess.Sql
{
    /// <summary>
    /// SQL语句片段
    /// </summary>
    public class SqlPiece
    {
        /// <summary>
        /// 保存构造好的内容片段
        /// </summary>
        StringBuilder sbContent = new StringBuilder();

        /// <summary>
        /// 获取保存构造的SQL语句对象
        /// </summary>
        protected StringBuilder Content
        {
            get { return sbContent; }
        }

        /// <summary>
        /// 获取或设置一个值，表示是否紧凑模式
        /// </summary>
        public bool CompactMode { get; set; }

        /// <summary>
        /// 输出转换后的SQL语句
        /// </summary>
        /// <returns>转换后的SQL语句</returns>
        public override string ToString()
        {
            return Content.ToString();
        }
    }
}
